<?php

// include_once(HOME_PATH.'conf/conf.php');

/**
 * @author ntourne
 * @date 27/08/2011 
 */
class DBManager {

	var $host = "";
	var $user = "";
	var $pass = "";
	var $schema = "";
	var $connection;

	
	/**
	 * Return a MySQL Connection
	 */	
	function getConnection() {

		$this->host = DB_HOST;
		$this->user = DB_USER;
		$this->passw = DB_PASSW;
		$this->schema = DB_SCHEMA;
		$this->connection = mysql_connect($this->host, $this->user, $this->passw,false,65536)
			or die("Database connection error");
		mysql_select_db($this->schema, $this->connection) or die("Unable to select database");
		return $this->connection;
	}

	
	/**
	 * Close a MySQL connection
	 */
	function closeConnection() {
		mysql_close($this->connection);
	}	

	
}
?>